---
title: "Client Pilot Data Spring 2020"
output:
flexdashboard::flex_dashboard:
orientation: columns
social: menu
source_code: embed
vertical_layout: scroll
theme: cerulean
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(rio)
library(here)
library(colorblindr)
library(gghighlight)
library(forcats)
library(ggrepel)
library(gt)
library(knitr)
library(kableExtra)
library(reactable)
library(plotly)
library(patchwork)
opts_chunk$set(echo = FALSE,
fig.width = 5,
fig.height = 6)
theme_set(theme_minimal(base_size = 8))
outcome <- import(here("data", "client_data_outcome.sav"),
setclass = "tbl_df") %>%
characterize() %>%
janitor::clean_names()
rm_prge <- import(here("data", "repeated_measures_prge.sav"),
setclass = "tbl_df") %>%
characterize() %>%
janitor::clean_names()
head(outcome)
head(rm_prge)
```
# PRGE Outcome Measures
Column {data-width=650}
-----------------------------------------------------------------------
```{r outcome measures data organization, include=FALSE}
head(outcome)
outcome_tidy <- outcome %>%
select(1:11) %>%
rename("PCSS Pre Score" = pcss_pre,
"PCSS Post Score" = pcss_post,
"HIT Pre Score" = hit_pre,
"HIT Post Score" = hit_post,
"CLASS Pre Score" = class_total_pre,
"CLASS Post Score" = class_total_post,
"BRIEF SR Pre Score" = brief_pre_self,
"BRIEF Parent Pre Score" = brief_pre_inf,
"BRIEF SR Post Score" = brief_post_self,
"BRIEF Parent Post Score" = brief_post_inf) %>%
pivot_longer(
cols = c(2:11),
names_to = "measure",
values_to = "score"
)
ggplot(outcome_tidy, aes(measure, score)) +
geom_col() +
coord_flip()
head(outcome)
brief <- outcome %>%
select(client, brief_pre_self, brief_post_self, brief_pre_inf, brief_post_inf)
brief_tidy <- brief %>%
rename("BRIEF SR Pre Score" = brief_pre_self,
"BRIEF SR Post Score" = brief_post_self,
"BRIEF Parent Pre Score" = brief_pre_inf,
"BRIEF Parent Post Score" = brief_post_inf) %>%
pivot_longer(
cols = c(2:5),
names_to = "measure",
values_to = "score"
)
class <- outcome %>%
select(client, class_total_pre, class_total_post) %>%
rename("CLASS Pre Score" = class_total_pre,
"CLASS Post Score" = class_total_post)
class_tidy <- class %>%
pivot_longer(
cols = c(2:3),
names_to = "measure",
values_to = "score"
)
symptoms <- outcome %>%
select(client, pcss_pre, pcss_post, hit_pre, hit_post) %>%
rename("PCSS Pre Score" = pcss_pre,
"PCSS Post Score" = pcss_post,
"HIT Pre Score" = hit_pre,
"HIT Post Score" = hit_post) %>%
pivot_longer(
cols = c(2:5),
names_to = "measure",
values_to = "score"
)
```
```{r outcome plots, include=FALSE}
p1 <- ggplot(brief_tidy, aes(measure, score)) +
geom_col(fill = "blue",
alpha = 0.7) +
coord_flip() +
geom_text(aes(measure, score, label = score),
nudge_y = -3,
color = "white") +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank(),
panel.grid.major.x = element_line(color = "gray80")) +
theme(plot.title = element_text(color = "black", size = 12, face = "bold", hjust = 0.5),
axis.text = element_text(size = 10),
axis.title=element_text(size=10),
strip.text = element_text(size = 10)) +
labs(x = "",
y = "Score",
title = "BRIEF Scores")
p1
p2 <- ggplot(class_tidy, aes(measure, score)) +
geom_col(fill = "blue",
alpha = 0.7) +
coord_flip() +
geom_text(aes(measure, score, label = score),
nudge_y = -3,
color = "white") +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank(),
panel.grid.major.x = element_line(color = "gray80")) +
theme(plot.title = element_text(color = "black", size = 12, face = "bold", hjust = 0.5),
axis.text = element_text(size = 10),
axis.title=element_text(size=10),
strip.text = element_text(size = 10)) +
labs(x = "",
y = "Score",
title = "CLASS Scores")
p2
p3 <- ggplot(symptoms, aes(measure, score)) +
geom_col(fill = "blue",
alpha = 0.7) +
coord_flip() +
geom_text(aes(measure, score, label = score),
nudge_y = -3,
color = "white") +
theme(panel.grid.major.y = element_blank(),
panel.grid.minor.x = element_blank(),
panel.grid.major.x = element_line(color = "gray80")) +
theme(plot.title = element_text(color = "black", size = 12, face = "bold", hjust = 0.5),
axis.text = element_text(size = 10),
axis.title=element_text(size=10),
strip.text = element_text(size = 10)) +
labs(x = "",
y = "Score",
title = "Symptom Checklist Results")
p3
```
```{r pathwork outcomes, include=TRUE, fig.align="center", fig.width=10, fig.height=7}
p1 + p2 + p3 +plot_layout(ncol = 1)
```
# PRGE Repeated Meausures
Column {data-width=650}
-----------------------------------------------------------------------
```{r repeated measures data cleaning, include=FALSE}
head(rm_prge)
track <- rm_prge %>%
select(session, status)
p4 <- ggplot(track, aes(session, status)) +
geom_line() +
geom_point(size = 2) +
scale_x_continuous(limits = c(0, 10),
breaks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) +
scale_y_continuous(limits = c(0, 6),
breaks = c(1, 2, 3, 4, 5, 6)) +
theme_classic() +
theme(plot.title = element_text(color = "black", size = 12, face = "bold", hjust = 0.5),
axis.text = element_text(size = 10),
axis.title=element_text(size=10),
strip.text = element_text(size = 10)) +
labs(x = "Session",
y = "Number of Times Required to Reread Content",
title = "Status Tracking Goal")
p4
effort_data <- rm_prge %>%
select(session, effort)
p5 <- ggplot(effort_data, aes(session, effort)) +
geom_line() +
geom_point(size = 2) +
scale_x_continuous(limits = c(0, 10),
breaks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) +
scale_y_continuous(limits = c(0, 4),
breaks = c(1, 2, 3, 4)) +
theme_classic() +
theme(plot.title = element_text(color = "black", size = 12, face = "bold", hjust = 0.5),
axis.text = element_text(size = 10),
axis.title=element_text(size=10),
strip.text = element_text(size = 10)) +
labs(x = "Session",
y = "Perceived Effort During Reading",
title = "Perceived Effort While Reading",
caption = "1 = No Effort at All\n 2 = Not Much Effort\n 3 = Some Effort\n 4 = A Lot of Effort")
p5
helpfulness <- rm_prge %>%
select(session, help)
p6 <- ggplot(helpfulness, aes(session, help)) +
geom_line() +
geom_point(size = 2) +
scale_x_continuous(limits = c(0, 10),
breaks = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) +
scale_y_continuous(limits = c(0, 5),
breaks = c(1, 2, 3, 4, 5)) +
theme_classic() +
theme(plot.title = element_text(color = "black", size = 12, face = "bold", hjust = 0.5),
axis.text = element_text(size = 10),
axis.title=element_text(size=10),
strip.text = element_text(size = 10)) +
labs(x = "Session",
y = "Perceived Helpfulness",
title = "Perceived Helpfulness of Reading Strategies",
caption = "1 = Not Helpful at All\n 2 = Not Helpful\n 3 = Somewhat Helpful\n 4 = Helpful\n 5 = Very Helpful")
p6
```
```{r status, include=TRUE, fig.align="center"}
p4
```
Column {data-width=350}
-----------------------------------------------------------------------
```{r effort, include=TRUE, fig.align="left"}
p5
```
```{r helpfulness, include=TRUE, fig.align="left"}
p6
```